package ycl.common.base.mapper;

import ycl.common.base.entity.BaseMsgEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * 消息数据库层
 *
 * @author YCL
 * @date 2021-08-23 20:30:58
 */
@Mapper
@Repository
public interface BaseMsgMapper<T extends BaseMsgEntity> extends BaseDao<T> {

	@Update("update ${tableName} set is_read = true where user_id = #{userId}")
	void msgReadBatch(Long userId, String tableName);
}
